package core

import (
	"bytes"
	"crypto/rand"
	"nprobe/enviroments"
)

func NewSalts(size int) map[int][]byte {
	salts := make(map[int][]byte)
	salts[0] = bytes.Repeat([]byte{255}, size)  // 全1
	salts[1] = bytes.Repeat([]byte{0}, size)    // 全0
	salts[2] = bytes.Repeat([]byte{0x5A}, size) // 0x5A
	salts[3] = make([]byte, size)               // 随机
	_, _ = rand.Read(salts[3])

	copy(salts[0], enviroments.MagicNumber)
	copy(salts[1], enviroments.MagicNumber)
	copy(salts[2], enviroments.MagicNumber)
	copy(salts[3], enviroments.MagicNumber)

	return salts
}
